﻿using Shinkansen.Configuration;

namespace Shinkansen.Web
{
    /// <summary>
    /// A custom cryptographic provider for Shinkansen
    /// </summary>
    /// <remarks>Produces a key/initialization vector.</remarks>
    public class CustomCryptoKeyProvider : ICryptoKeyProvider
    {
        private const string _key = "0C86166C5AE95267EFEB559457E34F0C62E5D11A08849B8E1AFC0829424141D5";
        private const string _iv = "90DAF18F6DAE16C74BAB8DCB0E6B47847269CC02BDFC8739EC1A5B88704A33490DCDFE06DE85E492C9791977BFC66EDE8B3D5581097A93386604AD84028EF56A";

        /// <summary>
        /// Gets the key.
        /// </summary>
        /// <value>The key.</value>
        /// <remarks>The recommended key length is 512 bits.</remarks>
        public string Key
        {
            get { return _key; }
        }

        /// <summary>
        /// Gets the initialization vector (IV).
        /// </summary>
        /// <value>The IV.</value>
        public string IV
        {
            get { return _iv; }
        }
    }
}
